#!/usr/bin/env python
# -*- coding:utf-8 -*-

import json
dic={'tom':['22','M'],'RAIN':{'18':'F'}}

#方法一、
#Jdic=json.dumps(dic)
#with open("json.txt","wb")as fw:
#    fw.write(Jdic)


#方法二、
#with open("json.txt","wb")as fr:
#    json.dump(dic,fr)

with open("json.txt","rb")as fr:
    Jdic=json.load(fr)
print Jdic
